﻿/// ---------------------------------------------
///
/// ---------------------------------------------

///---------------------------

//双击事件
function CustomDbClick() {
    parent.closeWin(); //去掉双击功能    
}


//添加信息
var fnCustomAdd = function () {
    const_EditEntity = "wkYearVacationRule";
    document.getElementById("dialog1_h").innerHTML = "新增年假规则";
    document.getElementById("EditUIWindow").src = "AutoLoadForm.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&fun=add";
    SetDWH(550, 480, YAHOO.example.container.dialog1);
    YAHOO.example.container.dialog1.show();
}

//修改信息
var fnCustomEdit = function () {
    var recordID = myDataTable.getSelectedRows()[0];
    record = myDataTable.getRecord(recordID);
    if (record == null) {
        alert("请选择一条记录");
        return;
    }
    const_EditEntity = "wkYearVacationRule";
    document.getElementById("dialog1_h").innerHTML = "修改年假规则" ;
    document.getElementById("EditUIWindow").src = "AutoLoadForm.aspx?r=" + Math.random() + "&entity=" + const_EditEntity + "&fun=edit" + "&id=" + record.getData(const_entityID);
    SetDWH(550, 480, YAHOO.example.container.dialog1);
    YAHOO.example.container.dialog1.show();
}


//初始化
if (typeof ($) != "undefined") {
    $(document).ready(function () {

    });
}


